home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / formpas.zip / DEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1993-04-14  |  2KB  |  60 lines

  1. { This file was used as an input file for FormPas. }
  2. { Altered code taken from turbo's grdemo.pas }
  3. { Original file is DEMO.OLD, new file is DEMO.PAS }
  4. { Try to find all the things it did with case, spacing and re-typing }
  5.  
  6. Program Formpas_Demo;
  7.  
  8.  
  9. Procedure Textdump;          { Dump the complete character sets to the screen }
  10. Const
  11.    Cgasizes:Array [0..4] Of Word = (1, 3, 7, 3, 3);
  12.    Normsizes:Array [0..4] of Word = (1, 4, 7, 4, 4);
  13. Var
  14.    Font : Word;
  15.    Viewinfo : Viewporttype;
  16.    Ch : char;
  17.  
  18. Begin                        { TEXTDUMP }
  19.    For Font := 0 to 4 do
  20.       Begin
  21.          Mainwindow (Fonts [Font]+' character set');
  22.          Getviewsettings (Viewinfo);
  23.          With Viewinfo do
  24.             Begin
  25.                Settextjustify (Lefttext, Toptext);
  26.                Moveto (2, 3);
  27.                If Font = Defaultfont
  28.                then
  29.                   Begin
  30.                      Settextstyle (Font, Horizdir, 1);
  31.                      Ch := #0;
  32.                      Repeat
  33.                         Outtext (Ch);
  34.                         If (Getx + Textwidth ('M')) > (X2-X1)
  35.                         then Moveto (2, Gety + Textheight ('M')+3);
  36.                         Ch := Succ (Ch);
  37.                      Until (Ch >= #255);
  38.                   end
  39.                else
  40.                   Begin
  41.                      If Maxy < 200
  42.                      then Settextstyle (Font, Horizdir, Cgasizes [Font])
  43.                      else Settextstyle (Font, Horizdir, Normsizes [Font]);
  44.                      Ch := '!';
  45.                      Repeat
  46.                         Outtext (Ch);
  47.                         If (Getx + Textwidth ('M')) > (X2-X1)
  48.                         then Moveto (2, Gety + Textheight ('M')+3);
  49.                         Ch := Succ (Ch);
  50.                      Until (Ord (Ch) = Ord ('~')+1);
  51.                   End;
  52.             end;             { with }
  53.          Waittogo;
  54.       end;                   { for loop }
  55. end;                         { TextDump }
  56.  
  57.  
  58. Begin                        { FormPas_Demo }
  59. end;
  60.